@import '~antd/es/style/themes/default.less';

@ant-layout-header:{
  height: 48px;
  line-height: 48px;
}
@pro-header-hover-bg: rgba(0, 0, 0, 0.025);

.header {
  height: 48px;
  // padding: 0 12px 0 0;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  position: relative;
}

:global {
  .ant-layout {
    height: 48px;
    min-height: 100vh;
    overflow-x: hidden;
  }
  .ant-layout-header {
    height: 48px;
    line-height: 48px;
  }
}

.logo {
  height: 48px;
  line-height: 4px;
  vertical-align: top;
  display: inline-block;
  padding: 0 0 0 12px;
  cursor: pointer;
  font-size: 16px;
  img {
    display: inline-block;
    vertical-align: middle;
  }
}

.menu {
  :global(.anticon) {
    margin-right: 8px;
  }
  :global(.ant-dropdown-menu-item) {
    width: 160px;
  }
}

.triggle {
  padding: 10px;
  font-size: 20px;
  cursor: pointer;
  transition: all .3s,padding 0s;
  // float: left;
  cursor: pointer;
  &:hover {
    color: #1890ff;
  }
}

.right {
  display: flex;
  float: right;
  height: 48px;
  margin-left: auto;
  overflow: hidden;
  .action {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 12px;
    cursor: pointer;
    transition: all 0.3s;

    &:hover {
      background: @pro-header-hover-bg;
    }
    &:global(.opened) {
      background: @pro-header-hover-bg;
    }
  }
  .search {
    padding: 0 12px;
    &:hover {
      background: transparent;
    }
  }
  .account {
    .avatar {
      margin-right: 8px;
      color: @primary-color;
      vertical-align: top;
      background: rgba(255, 255, 255, 0.85);
    }
  }
}

.dark {
  .action {
    &:hover {
      background: #252a3d;
    }
    &:global(.opened) {
      background: #252a3d;
    }
  }
}

@media only screen and (max-width: @screen-md) {
  :global(.ant-divider-vertical) {
    vertical-align: unset;
  }
  .name {
    display: none;
  }
  .right {
    position: absolute;
    top: 0;
    right: 12px;
    .account {
      .avatar {
        margin-right: 0;
      }
    }
    .search {
      display: none;
    }
  }
}

